<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>申报页面</title>
  <link rel="stylesheet" href="../../../yl/index.css" />
  <!-- 布局样式 -->
  <link rel="stylesheet" href="../../../yl/style.css" />
  <link rel="stylesheet" href="../../../style/wangeditor.css">
  <link rel="stylesheet" href="../../../yl/mobile.css" />
  <link rel="stylesheet" href="../../../yl/easyui.css" />
  <link rel="stylesheet" href="../../../yl/icon.css" />
</head>

<body>
  <!-- <div id="app"> -->
  <div class="easyui-navpanel" id="app" v-cloak>
    <header>
      <div class="m-toolbar">
        <div class="m-title">{{action=='Add'?'添加申报信息':action=='Modify'?'修改申报信息':''}}</div>
      </div>
    </header>
    <div class="easyui-navpanel panel-body panel-body-nobottom panel-body-noborder" style="height: 3000px"
      id="MainTable" ref="MainTable"
      :data-options="JSON.stringify({ 'TableName': 'yield_report', 'form': 'dataForm' ,'primary_key':'Yield_Report_SerialNumber' })">
      <div class="yl-main">
        <div class="table_titel">
          <div class="titel">申报信息</div>
        </div>
        <el-form :model="dataForm" ref="form" :inline-message="true" style="width: 100%">
          <el-descriptions :column="1" size="large" border>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">申报主体</div>
              </template>
              <yl-select v-model="dataForm.Yield_Implementation_Subject" clearable
                filterable placeholder="请选择申报主体" :options="personal_information"
                :props="{value:'ID_Card_Number',label:'Personal_Name'}">
                <el-table-column prop="ID_Card_Number" width="180" show-overflow-tooltip label="身份证号"></el-table-column>
                <el-table-column prop="Personal_Name" show-overflow-tooltip label="姓名"></el-table-column>
                <el-table-column prop="Birthday" show-overflow-tooltip label="出生日期"></el-table-column>
                <el-table-column prop="Gender" label="性别"></el-table-column>
                <el-table-column prop="Nation" label="民族"></el-table-column>
                <el-table-column prop="Registered_Residence" show-overflow-tooltip label="籍贯"></el-table-column>
                <el-table-column prop="Contact_Phone" label="联系方式"></el-table-column>
              </yl-select>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">省/市/区(县)</div>
              </template>
              <el-cascader @change="changeCity" v-model="cityValue" filterable class="borderless-input"
                :props="{value:'value',label:'label',children:'children'}" placeholder="请选择省/市/区(县)" :options="city"
                style="width: 100%"></el-cascader>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">乡镇(街道)/村庄(社区)</div>
              </template>
              <el-cascader :disabled="city1.length == 0" @change="changeCity1" class="borderless-input"
                v-model="cityValue1" filterable :props="{value:'ProvinceNumber',label:'Province',children:'children'}"
                placeholder="请选择乡镇(街道)/村庄(社区)" :options="city1" style="width: 100%"></el-cascader>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">申报日期</div>
              </template>
              <el-form-item prop="Yield_Report_Date"
                :rules="[{ required: true, message: '请选择申报日期', trigger: 'change' }]">
                <el-date-picker v-model="dataForm.Yield_Report_Date" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
                  class="borderless-input" type="date" placeholder="请选择申报日期" size="large"></el-date-picker>
              </el-form-item>
            </el-descriptions-item>
          </el-descriptions>
        </el-form>
        <div id="ChildTable">
          <div class="table_titel">
            <div class="titel">申报明细</div>
            <div class="operation">
              <el-button type="primary" size="small" @click="handleAdd('childDataForm')">新增</el-button>
              <el-button type="danger" size="small" @click="handleRemove('childDataForm')">删除</el-button>
            </div>
          </div>
          <el-form :model="{childDataForm}" ref="form1" :inline-message="true" style="width: 100%">
            <el-descriptions :column="3" size="large" border
              :data-options="JSON.stringify({ 'TableName': 'yield_report_detail', 'form': 'childDataForm', 'ParentTableName': 'yield_report'})"
              v-for="(item,index) in childDataForm.filter(item => item.Row_Status != '1')" :key="index">
              <el-descriptions-item>
                <template #label>
                  <div class="cell-item">申报类型</div>
                </template>
                <el-form-item :prop="'childDataForm.'+index+'.Yield_Report_Category_SerialNumber'"
                  :rules="[{ required: true, message: '请选择申报类型', trigger: 'change' }]">
                  <el-select @change="changeland_crop_record($event,item)" clearable
                    v-model.trim="item.Yield_Report_Category_SerialNumber" placeholder="请选择申报类型" filterable
                    style="width: 100%">
                    <el-option v-for="(item,index) in category" :key="index" :label="item.Yield_Report_Category"
                      :value="item.Yield_Report_Category_SerialNumber"></el-option>
                  </el-select>
                </el-form-item>
              </el-descriptions-item>
              <el-descriptions-item>
                <template #label>
                  <div class="cell-item">种植/养殖记录</div>
                </template>
                <el-form-item :prop="'childDataForm.'+index+'.Record_SerialNumber'"
                  :rules="[{ required: true, message: '请选择种/养殖记录', trigger: 'change' }]">
                  <yl-select @change="changeRecord($event,item,index)" v-model="item.Record_SerialNumber" clearable
                    filterable placeholder="请选择种/养殖记录" :options="land_crop_record1(item.Yield_Report_Category_SerialNumber)"
                    :props="{value:'Record_SerialNumber',label:'Natural_Resource_Name'}">
                    <el-table-column prop="Land_SerialNumber" width="180" show-overflow-tooltip
                      label="自然资源编号"></el-table-column>
                    <el-table-column prop="Natural_Resource_Name" width="180" show-overflow-tooltip
                      label="自然资源名称"></el-table-column>
                    <el-table-column prop="Crop_Name" show-overflow-tooltip label="种植/养殖"></el-table-column>
                    <el-table-column prop="Plate_Date" show-overflow-tooltip label="开始日期"></el-table-column>
                    <el-table-column prop="Harvest_Date" show-overflow-tooltip label="收获日期"></el-table-column>
                    <el-table-column prop="Area" show-overflow-tooltip label="面积"></el-table-column>
                    <el-table-column prop="Yield" show-overflow-tooltip label="产量"></el-table-column>
                  </yl-select>
                </el-form-item>
              </el-descriptions-item>
              <el-descriptions-item>
                <template #label>
                  <div class="cell-item">产值申报</div>
                </template>
                <el-form-item :rules="[{ required: true, message: '请输入产值申报', trigger: 'blur' }]" :prop="'childDataForm.'+index+'.Year_OutPut_Value'">
                  <el-input type="number" v-model="item.Year_OutPut_Value" class="borderless-input"
                    placeholder="请输入产值申报" />
                </el-form-item>
              </el-descriptions-item>
              
            </el-descriptions>
          </el-form>
          <!-- <el-tabs type="border-card">
            <el-tab-pane v-if="JSON.stringify(form) != '{}'" v-for="(obj,key) in form" :key="key" :label="key + 1">
              <el-descriptions v-if="form" :column="2" size="large" border>
                <el-descriptions-item>
                  <template #label>
                    <div class="cell-item">自然资源编号</div>
                  </template>
                  <el-input disabled v-model="obj.Land_SerialNumber" class="borderless-input" placeholder="请输入商户名称" />
                </el-descriptions-item>
                <el-descriptions-item>
                  <template #label>
                    <div class="cell-item">自然资源</div>
                  </template>
                  <el-input disabled v-model="obj.Natural_Resource_Name" class="borderless-input" placeholder="请输入商户名称" />
                </el-descriptions-item>
                <el-descriptions-item>
                  <template #label>
                    <div class="cell-item">种植作物/禽畜养殖/<br/>渔业养殖</div>
                  </template>
                  <el-input disabled v-model="obj.Crop_Name" class="borderless-input" placeholder="请输入商户名称" />
                </el-descriptions-item>
                <el-descriptions-item>
                  <template #label>
                    <div class="cell-item">种植/养殖日期</div>
                  </template>
                  <el-input disabled v-model="obj.Plate_Date" class="borderless-input" placeholder="请输入商户名称" />
                </el-descriptions-item>
                <el-descriptions-item>
                  <template #label>
                    <div class="cell-item">种植/养殖面积</div>
                  </template>
                  <el-input disabled v-model="obj.Area" class="borderless-input" placeholder="请输入商户名称" />
                </el-descriptions-item>
                <el-descriptions-item>
                  <template #label>
                    <div class="cell-item">产量/出栏量/渔获量</div>
                  </template>
                  <el-input disabled v-model="obj.Yield" class="borderless-input" placeholder="请输入商户名称" />
                </el-descriptions-item>
              </el-descriptions>
            </el-tab-pane>
          </el-tabs> -->
        </div>
      </div>
    </div>
    <footer class="botton-ann">
      <el-button @click="goBack">返回</el-button>
      <el-button type="primary" plain @click="handleSubmit" :loading="loading">提交</el-button>
    </footer>
  </div>
</body>
<script src="../../../utils/utils.js"></script>
<script src="../../../config/config.js"></script>
<script src="../../../utils/compressor.js"></script>
<script src="../../../utils/wangeditor.js"></script>
<script src="../../../utils/mixins.js"></script>
<script src="../../../yl/vue.js"></script>
<script src="../../../yl/index.js"></script>
<script src="../../../yl/zh-cn.mjs"></script>
<script src="../../../yl/index.iife.min.js"></script>
<script src="../../../yl/jquery.min.js"></script>
<script src="../../../utils/jquery.cookie.js"></script>
<script src="../../../yl/jquery.easyui.min.js"></script>
<script src="../../../yl/jquery.easyui.mobile.js"></script>
<script src="../../../yl/moment.min.js"></script>
<script src="../../../api/request.js"></script>
<script src="./js/add.js"></script>

</html>